﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for LogError
/// </summary>
public static class LogError
{
    private static StreamWriter log;
    private const string filePath = "C:\\logfile.txt";

    public static void writeToLogFile(string strLogText)//moet nog een username bijkomen wie wat doet
    {
        if (!File.Exists(filePath))
            log = new StreamWriter(filePath);
        else
            log = File.AppendText(filePath);

        log.WriteLine(DateTime.Now + "  " + strLogText);
        log.WriteLine();
        log.Close();
    }
}